package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.Video;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface VideoMapper extends BaseMapper<Video> {

    /**
     * 视频点赞
     * @param videoId
     * @return
     */
    Integer thumbVideo(@Param("videoId") Integer videoId);

    @Insert("insert into tb_video (video_title,video_url,course_id) values (#{videoTitle},#{videoUrl},#{courseId})")
    Integer addVideo(@Param("videoTitle") String videoTitle,
                     @Param("videoUrl") String videoUrl,
                     @Param("courseId") Integer courseId);
}
